package com.sprouting.ops.service;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sprouting.ops.dao.OpsRoleAuthorityDao;
import com.sprouting.ops.model.OpsRoleAuthority;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (RolePower)表服务实现类
 *
 * @author longx
 * @since 2023-03-19 22:44:35
 */
@Service
@Slf4j
public class OpsRoleAuthorityService extends ServiceImpl<OpsRoleAuthorityDao, OpsRoleAuthority> {

    @Resource
    private OpsRoleAuthorityDao opsRoleAuthorityDao;


    /**
     * 获取指定角色的所有的权限ID
     * @param roleId  角色ID
     * @return
     */
    public List<String> getAuthByRoleId(String roleId) {
        return opsRoleAuthorityDao.getAuthByRoleId(roleId);
    }
}

